I:/Documents/developpement/projets/C/blast/blastguy_wii_2.2/src/panel.h File Reference

Bonus or disease that change a unit behaviour. More...

#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <SDL/sdl.h>
#include "sprite.h"
#include "unit.h"
#include "map.h"
#include "tile.h"

Include dependency graph for panel.h:

This graph shows which files directly or indirectly include this file:


Enumerations

enum  e_panel_type
 a panel type is the id of a bonus, malus, or disease. More...

Functions

void panel_draw (panel *p_panel, SDL_Surface *destination)
 Draw the panel to the given surface.
int panel_add (panel **v_panel, map *p_map, int block_nb)
 Add panel to the map.
void panel_apply (panel *p_panel, unit *p_unit)
 apply the panel to a unit

Detailed Description

Bonus or disease that change a unit behaviour.

Author:
DREVET Olivier
Date:
September and October 2008
Note:
ANSI c99 compliance. Published under the GPL 3 license (see license.txt for more info)

Enumeration Type Documentation

enum e_panel_type

a panel type is the id of a bonus, malus, or disease.

Note:
there are no differances between a bonus or a disease. It's mean that a bounus can be countagious, or that a desease can not.


Function Documentation

void panel_apply ( panel *  p_panel,
unit p_unit 
)

apply the panel to a unit

Todo:
this is typically the kind of function which could be fun to script (with some lua), anyone could create / change panels.

void panel_draw ( panel *  p_panel,
SDL_Surface *  destination 
)

Draw the panel to the given surface.

Note:
The panel image is taken from the chipset in the panel's sprite. The image part index is calculated from the e_panel_type number multiplied by the TILE_SIZE (from tile.h)


Generated on Tue Nov 4 21:07:19 2008 for Blastgu by  doxygen 1.5.4